﻿
<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="/framework/head.jsp"%>

<!--********************* Part2:Java Code *********************-->
<%
	InoutTypePageData obj = (InoutTypePageData)context.getValue("InoutTypePageData");
%>

<!--********************* Part3:JavaScript Code ***************-->
<script language="javascript">

var g_check_items = new Array();
var g_i = 0 ;

g_check_items[g_i++] = new CheckItem("编码","Code",true,true,20,false,0);

g_check_items[g_i++] = new CheckItem("名称","Name",true,true,50,false,0);

g_check_items[g_i++] = new CheckItem("类别","InoutType",true,true,1,false,0);

g_check_items[g_i++] = new CheckItem("显示顺序","DisplayOrder",true,false,0,true,CHECK_ITEM_TYPE_INT);

g_check_items[g_i++] = new CheckItem("描述","Remark",false,true,200,false,0);

//g_check_items[g_i++] = new CheckItem("创建用户序号","CreateUserId",true,true,32,false,0);

//g_check_items[g_i++] = new CheckItem("创建用户","CreateUser",false,true,50,false,0);

//g_check_items[g_i++] = new CheckItem("单证创建时间","CreateTime",false,true,20,false,0);

//g_check_items[g_i++] = new CheckItem("最后修改人序号","LastUpdateUserId",true,true,32,false,0);

//g_check_items[g_i++] = new CheckItem("最后修改人","LastUpdateUser",false,true,50,false,0);

//g_check_items[g_i++] = new CheckItem("最后修改时间","LastUpdateTime",false,true,20,false,0);

function getMyElement(formname){   
    var obj = document.getElementById(formname);
    if(obj.value.length > 2){
        return false;
    }else{
        return true;
    }    
} 

function doSaveAndNew()
{
    if(!getMyElement("DisplayOrder")){
        alert("[显示顺序]不应大于两位");
        return false;
    }
	if(!CheckInput(g_check_items)) 
        return false;
	SetAction("saveAndNewInoutType");
	frm.submit();
}
function doSave()
{
    if(!getMyElement("DisplayOrder")){
        alert("[显示顺序]不应大于两位");
        return false;
    }
	if(!CheckInput(g_check_items)) return false;
	SetAction("saveInoutType");
	frm.submit();
}
function doCancel()
{
	SetAction("backListInoutType");
	frm.submit();
}

key_InitDefault();
key_RegSubmitHandler(doSaveAndNew);
</script>

<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->

<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code">

<input type=hidden name="Id" value="<%=obj.getId()%>">


<br>

<%=UIManager.addEditHeadTitle("出入库类型信息设置")%>


<!--********************* Part5:Edit Area  ***************-->
<%=uiEditStart%>>
<%
	int key_tab = 1 ;
%>


	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>编码：</td>
		<%=uiEditTD%>>
			<input type=text class="texts"  name="Code" size=20  value="<%=obj.viewCode(con)%>" key_tab="<%=key_tab++%>"><font color=red>*</font>
		</td>
	</tr>
	


	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>名称：</td>
		<%=uiEditTD%>>
			<input type=text class="texts"  name="Name" size=20  value="<%=obj.viewName(con)%>" key_tab="<%=key_tab++%>"><font color=red>*</font>
		</td>
	</tr>
	
    <%=uiEditTR%>>
        <%=uiEditHeadTD%> width=250>类别：</td>
        <%=uiEditTD%>>
        
            <select name="InoutType">
                <option value="<%=ConstDefine.STR_IN%>" <%=(obj.viewInoutType(con).equals(ConstDefine.STR_NAME_IN))?"selected":""%>><%=ConstDefine.STR_NAME_IN%></option>
                <option value="<%=ConstDefine.STR_OUT%>" <%=(obj.viewInoutType(con).equals(ConstDefine.STR_NAME_OUT))?"selected":""%>><%=ConstDefine.STR_NAME_OUT%></option>
            </select><font color=red>*</font>
             <!--<input type=text class="texts"  name="InoutType" size=20  value="<%=obj.viewInoutType(con)%>" key_tab="<%=key_tab++%>">--> 
        </td>
    </tr>

	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>显示顺序：</td>
		<%=uiEditTD%>>
			<input type=text class="texts" id="DisplayOrder" name="DisplayOrder" size=20  value="<%=obj.viewDisplayOrder(con)%>" key_tab="<%=key_tab++%>"><font color=red>*</font>
		     
        </td>
	</tr>

	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>描述：</td>
		<%=uiEditTD%>>
            <textarea name="Remark" cols=60 rows=8 key_tab="<%=key_tab++%>"><%=obj.viewRemark(con)%></textarea>
			<!-- <input type=text class="texts"  name="Remark" size=20  value="<%=obj.viewRemark(con)%>" key_tab="<%=key_tab++%>"> -->
		</td>
	</tr>

<%=uiEditEnd%>

<!--********************* Part6:Action Area  ***************-->
<%=uiCommandStart%>>
	<%=uiCommandTR%>>
   		<%=uiCommandTD%>>                     
			<input type=button class="buttons" value=" 保存&添加 " onclick="doSaveAndNew();return false;">
			<input type=button class="buttons" value="    保存   " onclick="doSave();return false;">
			<input type=button class="buttons" value="    返回   " onclick="doCancel();return false;">
		</td>
	</tr>
<%=uiCommandEnd%>
</form>

<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :Sindy
	FileName  :/system/base/InoutTypeEdit.jsp
-->
